package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.entity.Resume;
import com.jeff.tianti.cms.dao.ResumeDao;
import com.jeff.tianti.cms.dto.ResumeQueryDTO;
import com.jeff.tianti.common.service.CommonService;
import com.jeff.tianti.common.entity.PageModel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * @author liuyi
 * @desc ResumeService类 
 * @date 2019-06-28
 */
@Service
public class ResumeService extends CommonService< Resume,String >  {

    @Autowired
    private ResumeDao resumeDao;

    @Autowired
    public void setResumeDao(ResumeDao resumeDao){
      super.setCommonDao(resumeDao);
    }

    public PageModel<Resume> queryResumePage(ResumeQueryDTO resumeQueryDTO){
           return this.resumeDao.queryResumePage(resumeQueryDTO);
    }

    public List<Resume> queryResumeList(ResumeQueryDTO resumeQueryDTO){
           return this.resumeDao.queryResumeList(resumeQueryDTO);
    }


    public List<Resume> findByUid(String uid) {
        return this.resumeDao.findByUid(uid);
    }


    public Page<Resume> findByUidAndPage(String uid, Pageable pageable) {
        return resumeDao.findByUidAndPage(uid, pageable);
    }

    public int findCountByUid(String uid) {
        return resumeDao.findCountByUid(uid);
    }
}